package com.cf.enums;

import lombok.Getter;

/**
 * @Author lzqinga@126.com
 * @Date 2024/10/17  10:26
 */
@Getter
public enum Source {

    FRIEND_RECOMMEND(0, "好友推荐"),
    PENGYOUQUAN(1, "朋友圈"),
    DOUYIN(2, "抖音");

    private Integer id;

    private String name;
    private Source(Integer id, String name){
        this.id = id;
        this.name = name;
    }

    public static Source valueOf(Integer id){
        switch (id){
            case 1: return PENGYOUQUAN;
            case 2: return DOUYIN;
            default: return FRIEND_RECOMMEND;
        }
    }
}
